WTL Controls
|
Back to the WTL Controls Home Page. |
A CStatic descendant providing customizable background color and edge style, but no text. More...
#include <ColorBlob.h>
Public Member Functions | |
CColorBlob () noexcept | |
virtual | ~CColorBlob () |
void | SubclassStatic (HWND hWnd) |
Subclass a control window and create the colored background brush. More... | |
void | UnSubclassStatic () |
Un-subclass the window and release GDI resources. More... | |
void | SetBackColor (COLORREF value) |
Specify a new background color. A call to UpdateContent may be required to make the new color visible. More... | |
COLORREF | GetBackColor () const |
Default: COLOR_RED . More... | |
void | SetEdgeStyle (CEdgeStyle style) |
Specify a new edge style. A call to UpdateContent may be required to make the new color visible. More... | |
CEdgeStyle | GetEdgeStyle () const |
Default: CEdgeStyle::esLine . More... | |
void | UpdateContent () |
Wraps calls to Invalidate and UpdateWindow, updating the back buffer and blitting the new content to the window. More... | |
A CStatic descendant providing customizable background color and edge style, but no text.
This CStatic descendant overrides handles WM_PAINT to provide custom background color and edge style, but it doesn't display text. Custom double-buffering is provided; changes to appearance may not be visible until a repaint is forced by calling UpdateContent (or by separately calling Invalidate and UpdateWindow).
Window edge styles defined with OS constants (e.g, SS_ETCHEDFRAME or WS_MODALFRAME will overwrite edges defined by setting the EdgeStyle property. Use EdgeStyle OR windows styles to define an edge, not both.
Typical usage is depicted below.
Definition at line 49 of file ColorBlob.h.
|
noexcept |
Definition at line 20 of file ColorBlob.cpp.
|
virtual |
Definition at line 33 of file ColorBlob.cpp.
void BIS_WTL_CONTROLS::CColorBlob::SubclassStatic | ( | HWND | hWnd | ) |
Subclass a control window and create the colored background brush.
hWnd | Handle of the control window to subclass. |
void |
Definition at line 57 of file ColorBlob.cpp.
void BIS_WTL_CONTROLS::CColorBlob::UnSubclassStatic | ( | ) |
Un-subclass the window and release GDI resources.
Definition at line 70 of file ColorBlob.cpp.
void BIS_WTL_CONTROLS::CColorBlob::SetBackColor | ( | COLORREF | value | ) |
Specify a new background color. A call to UpdateContent may be required to make the new color visible.
value | The new background color. |
void |
Definition at line 107 of file ColorBlob.cpp.
COLORREF BIS_WTL_CONTROLS::CColorBlob::GetBackColor | ( | ) | const |
Default: COLOR_RED
.
Returns the background color.
COLORREF | The background color. |
Definition at line 93 of file ColorBlob.cpp.
void BIS_WTL_CONTROLS::CColorBlob::SetEdgeStyle | ( | CEdgeStyle | style | ) |
Specify a new edge style. A call to UpdateContent may be required to make the new color visible.
style | The new edge style. |
void |
Definition at line 135 of file ColorBlob.cpp.
CEdgeStyle BIS_WTL_CONTROLS::CColorBlob::GetEdgeStyle | ( | ) | const |
Default: CEdgeStyle::esLine
.
CEdgeStyle | The currently selected edge style. |
Definition at line 121 of file ColorBlob.cpp.
void BIS_WTL_CONTROLS::CColorBlob::UpdateContent | ( | ) |
Wraps calls to Invalidate and UpdateWindow, updating the back buffer and blitting the new content to the window.
Definition at line 150 of file ColorBlob.cpp.